
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author dreamcatcher
 * @date 2022/3/1 21:34
 * 转移字符
 */
public class RegExp02 {
    public static void main(String[] args) {
        String content = "abc.(abc(123";
        //匹配.号
//        String regStr = "\\.";


        //匹配小括号
        String regStr = "\\(";
        Pattern pattern = Pattern.compile(regStr);

        Matcher matcher = pattern.matcher(content);

        while (matcher.find()){
            System.out.println(matcher.group(0));
        }

    }
}
